{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Helpdesk Hard"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "─ \u001b[1mAttaching packages\u001b[22m ──────────────────── tidyverse 1.3.0 ─\n",
      "\n",
      "\u001b[32m✔\u001b[39m \u001b[34mggplot2\u001b[39m 3.3.0     \u001b[32m✔\u001b[39m \u001b[34mpurrr  \u001b[39m 0.3.4\n",
      "\u001b[32m✔\u001b[39m \u001b[34mtibble \u001b[39m 3.0.1     \u001b[32m✔\u001b[39m \u001b[34mdplyr  \u001b[39m 0.8.5\n",
      "\u001b[32m✔\u001b[39m \u001b[34mtidyr  \u001b[39m 1.0.2     \u001b[32m✔\u001b[39m \u001b[34mstringr\u001b[39m 1.4.0\n",
      "\u001b[32m✔\u001b[39m \u001b[34mreadr  \u001b[39m 1.3.1     \u001b[32m✔\u001b[39m \u001b[34mforcats\u001b[39m 0.5.0\n",
      "\n",
      "─ \u001b[1mConflicts\u001b[22m ───────────────────── tidyverse_conflicts() ─\n",
      "\u001b[31m✖\u001b[39m \u001b[34mdplyr\u001b[39m::\u001b[32mfilter()\u001b[39m masks \u001b[34mstats\u001b[39m::filter()\n",
      "\u001b[31m✖\u001b[39m \u001b[34mdplyr\u001b[39m::\u001b[32mlag()\u001b[39m    masks \u001b[34mstats\u001b[39m::lag()\n",
      "\n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      "Password? ····\n"
     ]
    }
   ],
   "source": [
    "library(tidyverse)\n",
    "library(DBI)\n",
    "library(getPass)\n",
    "drv <- switch(Sys.info()['sysname'],\n",
    "             Windows=\"PostgreSQL Unicode(x64)\",\n",
    "             Darwin=\"/usr/local/lib/psqlodbcw.so\",\n",
    "             Linux=\"PostgreSQL\")\n",
    "con <- dbConnect(\n",
    "  odbc::odbc(),\n",
    "  driver = drv,\n",
    "  Server = \"localhost\",\n",
    "  Database = \"sqlzoo\",\n",
    "  UID = \"postgres\",\n",
    "  PWD = getPass(\"Password?\"),\n",
    "  Port = 5432\n",
    ")\n",
    "options(repr.matrix.max.rows=20)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 11.\n",
    "Show the manager and number of calls received for each hour of the day on 2017-08-12\n",
    "\n",
    "```\n",
    "+---------+---------------+----+\n",
    "| Manager | Hr            | cc |\n",
    "+---------+---------------+----+\n",
    "| LB1     | 2017-08-12 08 |  6 |\n",
    "| LB1     | 2017-08-12 09 | 16 |\n",
    "| LB1     | 2017-08-12 10 | 11 |\n",
    "| LB1     | 2017-08-12 11 |  6 |\n",
    "| LB1     | 2017-08-12 12 |  8 |\n",
    "| LB1     | 2017-08-12 13 |  4 |\n",
    "| AE1     | 2017-08-12 14 | 12 |\n",
    "| AE1     | 2017-08-12 15 |  8 |\n",
    "| AE1     | 2017-08-12 16 |  8 |\n",
    "| AE1     | 2017-08-12 17 |  7 |\n",
    "| AE1     | 2017-08-12 19 |  5 |\n",
    "+---------+---------------+----+\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "shift <- dbReadTable(con, 'Shift')\n",
    "staff <- dbReadTable(con, 'Staff')\n",
    "issue <- dbReadTable(con, 'Issue')\n",
    "shift_type <- dbReadTable(con, 'Shift_type')\n",
    "level <- dbReadTable(con, 'Level')\n",
    "customer <- dbReadTable(con, 'Customer')\n",
    "caller <- dbReadTable(con, 'Caller')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<table>\n",
       "<caption>A grouped_df: 11 × 3</caption>\n",
       "<thead>\n",
       "\t<tr><th scope=col>Manager</th><th scope=col>Hr</th><th scope=col>n</th></tr>\n",
       "\t<tr><th scope=col>&lt;chr&gt;</th><th scope=col>&lt;chr&gt;</th><th scope=col>&lt;int&gt;</th></tr>\n",
       "</thead>\n",
       "<tbody>\n",
       "\t<tr><td>LB1</td><td>2017-08-12 08</td><td> 6</td></tr>\n",
       "\t<tr><td>LB1</td><td>2017-08-12 09</td><td>16</td></tr>\n",
       "\t<tr><td>LB1</td><td>2017-08-12 10</td><td>11</td></tr>\n",
       "\t<tr><td>LB1</td><td>2017-08-12 11</td><td> 6</td></tr>\n",
       "\t<tr><td>LB1</td><td>2017-08-12 12</td><td> 8</td></tr>\n",
       "\t<tr><td>LB1</td><td>2017-08-12 13</td><td> 4</td></tr>\n",
       "\t<tr><td>AE1</td><td>2017-08-12 14</td><td>12</td></tr>\n",
       "\t<tr><td>AE1</td><td>2017-08-12 15</td><td> 8</td></tr>\n",
       "\t<tr><td>AE1</td><td>2017-08-12 16</td><td> 8</td></tr>\n",
       "\t<tr><td>AE1</td><td>2017-08-12 17</td><td> 7</td></tr>\n",
       "\t<tr><td>AE1</td><td>2017-08-12 19</td><td> 5</td></tr>\n",
       "</tbody>\n",
       "</table>\n"
      ],
      "text/latex": [
       "A grouped\\_df: 11 × 3\n",
       "\\begin{tabular}{lll}\n",
       " Manager & Hr & n\\\\\n",
       " <chr> & <chr> & <int>\\\\\n",
       "\\hline\n",
       "\t LB1 & 2017-08-12 08 &  6\\\\\n",
       "\t LB1 & 2017-08-12 09 & 16\\\\\n",
       "\t LB1 & 2017-08-12 10 & 11\\\\\n",
       "\t LB1 & 2017-08-12 11 &  6\\\\\n",
       "\t LB1 & 2017-08-12 12 &  8\\\\\n",
       "\t LB1 & 2017-08-12 13 &  4\\\\\n",
       "\t AE1 & 2017-08-12 14 & 12\\\\\n",
       "\t AE1 & 2017-08-12 15 &  8\\\\\n",
       "\t AE1 & 2017-08-12 16 &  8\\\\\n",
       "\t AE1 & 2017-08-12 17 &  7\\\\\n",
       "\t AE1 & 2017-08-12 19 &  5\\\\\n",
       "\\end{tabular}\n"
      ],
      "text/markdown": [
       "\n",
       "A grouped_df: 11 × 3\n",
       "\n",
       "| Manager &lt;chr&gt; | Hr &lt;chr&gt; | n &lt;int&gt; |\n",
       "|---|---|---|\n",
       "| LB1 | 2017-08-12 08 |  6 |\n",
       "| LB1 | 2017-08-12 09 | 16 |\n",
       "| LB1 | 2017-08-12 10 | 11 |\n",
       "| LB1 | 2017-08-12 11 |  6 |\n",
       "| LB1 | 2017-08-12 12 |  8 |\n",
       "| LB1 | 2017-08-12 13 |  4 |\n",
       "| AE1 | 2017-08-12 14 | 12 |\n",
       "| AE1 | 2017-08-12 15 |  8 |\n",
       "| AE1 | 2017-08-12 16 |  8 |\n",
       "| AE1 | 2017-08-12 17 |  7 |\n",
       "| AE1 | 2017-08-12 19 |  5 |\n",
       "\n"
      ],
      "text/plain": [
       "   Manager Hr            n \n",
       "1  LB1     2017-08-12 08  6\n",
       "2  LB1     2017-08-12 09 16\n",
       "3  LB1     2017-08-12 10 11\n",
       "4  LB1     2017-08-12 11  6\n",
       "5  LB1     2017-08-12 12  8\n",
       "6  LB1     2017-08-12 13  4\n",
       "7  AE1     2017-08-12 14 12\n",
       "8  AE1     2017-08-12 15  8\n",
       "9  AE1     2017-08-12 16  8\n",
       "10 AE1     2017-08-12 17  7\n",
       "11 AE1     2017-08-12 19  5"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "issue %>%\n",
    "    mutate(calldate=as.Date(Call_date)) %>%\n",
    "    inner_join(shift, by=c(Taken_by=\"Operator\", \n",
    "                           calldate=\"Shift_date\")) %>%\n",
    "    filter(as.Date(Call_date)==as.Date('2017-8-12')) %>%\n",
    "    mutate(Hr=format(Call_date, '%Y-%m-%d %H')) %>%\n",
    "    group_by(Manager, Hr) %>%\n",
    "    tally %>%\n",
    "    arrange(Hr)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 12.\n",
    "**80/20 rule. It is said that 80% of the calls are generated by 20% of the callers. Is this true? What percentage of calls are generated by the most active 20% of callers.**\n",
    "\n",
    "Note - Andrew has not managed to do this in one query - but he believes it is possible.\n",
    "\n",
    "```\n",
    "+---------+\n",
    "| t20pc   |\n",
    "+---------+\n",
    "| 32.2581 |\n",
    "+---------+\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<table>\n",
       "<caption>A data.frame: 1 × 1</caption>\n",
       "<thead>\n",
       "\t<tr><th scope=col>x</th></tr>\n",
       "\t<tr><th scope=col>&lt;dbl&gt;</th></tr>\n",
       "</thead>\n",
       "<tbody>\n",
       "\t<tr><td>32.25806</td></tr>\n",
       "</tbody>\n",
       "</table>\n"
      ],
      "text/latex": [
       "A data.frame: 1 × 1\n",
       "\\begin{tabular}{l}\n",
       " x\\\\\n",
       " <dbl>\\\\\n",
       "\\hline\n",
       "\t 32.25806\\\\\n",
       "\\end{tabular}\n"
      ],
      "text/markdown": [
       "\n",
       "A data.frame: 1 × 1\n",
       "\n",
       "| x &lt;dbl&gt; |\n",
       "|---|\n",
       "| 32.25806 |\n",
       "\n"
      ],
      "text/plain": [
       "  x       \n",
       "1 32.25806"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "a <- issue %>%\n",
    "    group_by(Caller_id) %>%\n",
    "    tally %>% \n",
    "    ungroup %>%\n",
    "    arrange(desc(n)) %>%\n",
    "    mutate(rn=row_number(n))\n",
    "100 * (a %>% \n",
    "    top_frac(0.2, wt=rn) %>% \n",
    "    summarise(x=sum(n))) / \n",
    "    (a %>% \n",
    "    summarise(x=sum(n)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 13.\n",
    "**Annoying customers. Customers who call in the last five minutes of a shift are annoying. Find the most active customer who has never been annoying.**\n",
    "\n",
    "```\n",
    "+--------------+------+\n",
    "| Company_name | abna |\n",
    "+--------------+------+\n",
    "| High and Co. |   20 |\n",
    "+--------------+------+\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<table>\n",
       "<caption>A tibble: 1 × 2</caption>\n",
       "<thead>\n",
       "\t<tr><th scope=col>Company_name</th><th scope=col>abna</th></tr>\n",
       "\t<tr><th scope=col>&lt;chr&gt;</th><th scope=col>&lt;int&gt;</th></tr>\n",
       "</thead>\n",
       "<tbody>\n",
       "\t<tr><td>High and Co.</td><td>20</td></tr>\n",
       "</tbody>\n",
       "</table>\n"
      ],
      "text/latex": [
       "A tibble: 1 × 2\n",
       "\\begin{tabular}{ll}\n",
       " Company\\_name & abna\\\\\n",
       " <chr> & <int>\\\\\n",
       "\\hline\n",
       "\t High and Co. & 20\\\\\n",
       "\\end{tabular}\n"
      ],
      "text/markdown": [
       "\n",
       "A tibble: 1 × 2\n",
       "\n",
       "| Company_name &lt;chr&gt; | abna &lt;int&gt; |\n",
       "|---|---|\n",
       "| High and Co. | 20 |\n",
       "\n"
      ],
      "text/plain": [
       "  Company_name abna\n",
       "1 High and Co. 20  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "suppressPackageStartupMessages(library(lubridate))\n",
    "bm <- issue %>% \n",
    "    mutate(shiftdate=as.Date(Call_date)) %>%\n",
    "    inner_join(shift, by=c(Taken_by=\"Operator\", shiftdate=\"Shift_date\")) %>%\n",
    "    inner_join(shift_type, by=c(Shift_type=\"Shift_type\")) %>%\n",
    "    left_join(caller, by=c(Caller_id=\"Caller_id\")) %>%\n",
    "    left_join(customer, by=c(Company_ref=\"Company_ref\")) %>%\n",
    "    mutate(shiftime=ymd_hm(paste(shiftdate, End_time)),\n",
    "           tdiff=shiftime-Call_date) %>%\n",
    "    filter(tdiff<=dminutes(5)) %>%\n",
    "    distinct(Company_ref) %>%\n",
    "    pull\n",
    "issue %>%\n",
    "    inner_join(caller, by=c(Caller_id=\"Caller_id\")) %>%\n",
    "    inner_join(customer, by=c(Company_ref=\"Company_ref\")) %>%\n",
    "    filter(! Company_ref %in% bm) %>%\n",
    "    group_by(Company_name) %>%\n",
    "    tally(name=\"abna\") %>%\n",
    "    ungroup %>%\n",
    "    arrange(desc(abna)) %>%\n",
    "    slice(1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 14.\n",
    "**Maximal usage. If every caller registered with a customer makes a call in one day then that customer has \"maximal usage\" of the service. List the maximal customers for 2017-08-13.**\n",
    "\n",
    "```\n",
    "+-------------------+--------------+-------------+\n",
    "| company_name      | caller_count | issue_count |\n",
    "+-------------------+--------------+-------------+\n",
    "| Askew Inc.        |            2 |           2 |\n",
    "| Bai Services      |            2 |           2 |\n",
    "| Dasher Services   |            3 |           3 |\n",
    "| High and Co.      |            5 |           5 |\n",
    "| Lady Retail       |            4 |           4 |\n",
    "| Packman Shipping  |            3 |           3 |\n",
    "| Pitiable Shipping |            2 |           2 |\n",
    "| Whale Shipping    |            2 |           2 |\n",
    "+-------------------+--------------+-------------+\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<table>\n",
       "<caption>A grouped_df: 8 × 4</caption>\n",
       "<thead>\n",
       "\t<tr><th scope=col>Company_ref</th><th scope=col>Company_name</th><th scope=col>caller_count</th><th scope=col>issue_count</th></tr>\n",
       "\t<tr><th scope=col>&lt;int&gt;</th><th scope=col>&lt;chr&gt;</th><th scope=col>&lt;int&gt;</th><th scope=col>&lt;int&gt;</th></tr>\n",
       "</thead>\n",
       "<tbody>\n",
       "\t<tr><td>149</td><td>Askew Inc.       </td><td>2</td><td>2</td></tr>\n",
       "\t<tr><td>133</td><td>Bai Services     </td><td>2</td><td>2</td></tr>\n",
       "\t<tr><td>135</td><td>Dasher Services  </td><td>3</td><td>3</td></tr>\n",
       "\t<tr><td>146</td><td>High and Co.     </td><td>6</td><td>6</td></tr>\n",
       "\t<tr><td>140</td><td>Lady Retail      </td><td>5</td><td>5</td></tr>\n",
       "\t<tr><td>109</td><td>Packman Shipping </td><td>3</td><td>3</td></tr>\n",
       "\t<tr><td>128</td><td>Pitiable Shipping</td><td>2</td><td>2</td></tr>\n",
       "\t<tr><td>115</td><td>Whale Shipping   </td><td>2</td><td>2</td></tr>\n",
       "</tbody>\n",
       "</table>\n"
      ],
      "text/latex": [
       "A grouped\\_df: 8 × 4\n",
       "\\begin{tabular}{llll}\n",
       " Company\\_ref & Company\\_name & caller\\_count & issue\\_count\\\\\n",
       " <int> & <chr> & <int> & <int>\\\\\n",
       "\\hline\n",
       "\t 149 & Askew Inc.        & 2 & 2\\\\\n",
       "\t 133 & Bai Services      & 2 & 2\\\\\n",
       "\t 135 & Dasher Services   & 3 & 3\\\\\n",
       "\t 146 & High and Co.      & 6 & 6\\\\\n",
       "\t 140 & Lady Retail       & 5 & 5\\\\\n",
       "\t 109 & Packman Shipping  & 3 & 3\\\\\n",
       "\t 128 & Pitiable Shipping & 2 & 2\\\\\n",
       "\t 115 & Whale Shipping    & 2 & 2\\\\\n",
       "\\end{tabular}\n"
      ],
      "text/markdown": [
       "\n",
       "A grouped_df: 8 × 4\n",
       "\n",
       "| Company_ref &lt;int&gt; | Company_name &lt;chr&gt; | caller_count &lt;int&gt; | issue_count &lt;int&gt; |\n",
       "|---|---|---|---|\n",
       "| 149 | Askew Inc.        | 2 | 2 |\n",
       "| 133 | Bai Services      | 2 | 2 |\n",
       "| 135 | Dasher Services   | 3 | 3 |\n",
       "| 146 | High and Co.      | 6 | 6 |\n",
       "| 140 | Lady Retail       | 5 | 5 |\n",
       "| 109 | Packman Shipping  | 3 | 3 |\n",
       "| 128 | Pitiable Shipping | 2 | 2 |\n",
       "| 115 | Whale Shipping    | 2 | 2 |\n",
       "\n"
      ],
      "text/plain": [
       "  Company_ref Company_name      caller_count issue_count\n",
       "1 149         Askew Inc.        2            2          \n",
       "2 133         Bai Services      2            2          \n",
       "3 135         Dasher Services   3            3          \n",
       "4 146         High and Co.      6            6          \n",
       "5 140         Lady Retail       5            5          \n",
       "6 109         Packman Shipping  3            3          \n",
       "7 128         Pitiable Shipping 2            2          \n",
       "8 115         Whale Shipping    2            2          "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "issue %>% \n",
    "    filter(as.Date(Call_date)==as.Date('2017-8-13')) %>%\n",
    "    right_join(caller, by=c(Caller_id=\"Caller_id\")) %>%\n",
    "    left_join(customer, by=c(Company_ref=\"Company_ref\")) %>%\n",
    "    group_by(Company_ref, Company_name, Caller_id) %>%\n",
    "    summarise(caller_count=n(), issue_count=sum(!is.na(Call_ref))) %>%\n",
    "    ungroup %>%\n",
    "    group_by(Company_ref, Company_name) %>%\n",
    "    summarise(caller_count=sum(caller_count), issue_count=sum(issue_count)) %>%\n",
    "    filter(caller_count==issue_count) %>%\n",
    "    arrange(Company_name)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 15.\n",
    "**Consecutive calls occur when an operator deals with two callers within 10 minutes. Find the longest sequence of consecutive calls – give the name of the operator and the first and last call date in the sequence.**\n",
    "\n",
    "```\n",
    "+----------+---------------------+---------------------+-------+\n",
    "| taken_by | first_call          | last_call           | calls |\n",
    "+----------+---------------------+---------------------+-------+\n",
    "| AB1      | 2017-08-14 09:06:00 | 2017-08-14 10:17:00 |    24 |\n",
    "+----------+---------------------+---------------------+-------+\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "ename": "ERROR",
     "evalue": "Error in parse(text = x, srcfile = src): <text>:1:6: unexpected symbol\n1: WITH t\n         ^\n",
     "output_type": "error",
     "traceback": [
      "Error in parse(text = x, srcfile = src): <text>:1:6: unexpected symbol\n1: WITH t\n         ^\nTraceback:\n"
     ]
    }
   ],
   "source": [
    "WITH t AS(\n",
    "-- label consecutive calls 0\n",
    "  SELECT \"Issue\".*, \n",
    "    CASE WHEN \"Call_date\" - LAG(\"Call_date\", 1) OVER (\n",
    "        PARTITION BY \"Taken_by\" ORDER BY \"Call_date\")> INTERVAL '10 minute' THEN 1 \n",
    "         ELSE 0 END flag\n",
    "    FROM \"Issue\"\n",
    "), g AS (\n",
    "-- cumsum the flags for grouping\n",
    "  SELECT t.*, SUM(t.flag) OVER (\n",
    "      PARTITION BY t.\"Taken_by\" ORDER BY t.\"Call_date\") AS grp\n",
    "    FROM t\n",
    "), rslt AS (\n",
    "-- aggregate\n",
    "  SELECT \"Taken_by\", grp, MIN(\"Call_date\") first_call, \n",
    "    MAX(\"Call_date\") last_call, COUNT(\"Caller_id\") n_calls\n",
    "    FROM g\n",
    "    GROUP BY \"Taken_by\", grp\n",
    ")\n",
    "SELECT \"Taken_by\", first_call, last_call, n_calls\n",
    "  FROM rslt WHERE n_calls=(SELECT MAX(n_calls) FROM rslt);\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "a <- issue %>%\n",
    "    group_by(Taken_by) %>%\n",
    "    mutate(rn=row_number(Call_date))\n",
    "consec_call <- a %>%\n",
    "    left_join(a %>%\n",
    "               mutate(rn=rn-1) %>%\n",
    "               select(Taken_by, rn, Call_date),\n",
    "              by=c(Taken_by=\"Taken_by\", rn=\"rn\")) %>%\n",
    "    mutate(flag=replace_na(\n",
    "        Call_date.y-Call_date.x > dminutes(10), 0)) %>%\n",
    "    mutate(grp=cumsum(flag))\n",
    "consec_call %>%\n",
    "    group_by(Taken_by, grp) %>%\n",
    "    summarise(first_call=min(Call_date.x), \n",
    "              last_call=max(Call_date.x), \n",
    "              n_calls=n()) %>%\n",
    "    ungroup %>%\n",
    "    select(-grp) %>%\n",
    "    top_n(1, wt=n_calls)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "dbDisconnect(con)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "R",
   "language": "R",
   "name": "ir"
  },
  "language_info": {
   "codemirror_mode": "r",
   "file_extension": ".r",
   "mimetype": "text/x-r-source",
   "name": "R",
   "pygments_lexer": "r",
   "version": "3.6.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
